
export const dynamicRouter = [
  {
    path: '/watchCom',
    name: 'watchCom',
    component: () => import('@/views/CompWatch.vue'),
    meta: {
      title: 'watch监听',
    },
  },
  {
    path: '/useSass',
    name: 'useSass',
    component: () => import('@/views/UseSass.vue'),
    meta: {
      title: '使用Sass',
    },
  },
  {
    path: '/propsAbout',
    name: 'propsAbout',
    component: () => import('@/views/PropsAbout.vue'),
    meta: {
      title: 'Props相关',
    },
  },
  {
    path: '/dynamicCom',
    name: 'dynamicCom',
    component: () => import('@/views/DynamicCom.vue'),
    meta: {
      title: '动态组件',
    },
  },
  {
    path: '/slotCom',
    name: 'slotCom',
    component: () => import('@/views/SlotCom.vue'),
    meta: {
      title: '插槽组件',
    },
  },
  {
    path: '/teleportTest',
    name: 'teleportTest',
    component: () => import('@/views/TeleportTest.vue'),
    meta: {
      title: 'Teleport测试',
    },
  },
  {
    path: '/transitionCom',
    name: 'transitionCom',
    component: () => import('@/views/TransitionCom.vue'),
    meta: {
      title: 'Transition过渡',
    },
  },
  {
    path: '/useProvide',
    name: 'useProvide',
    component: () => import('@/views/UseProvide.vue'),
    meta: {
      title: 'Provide/Inject',
    },
  },
  {
    path: '/selfDiective',
    name: 'selfDiective',
    component: () => import('@/views/SelfDiective.vue'),
    meta: {
      title: 'SelfDiective',
    },
  },
  {
    path: '/selfHooks',
    name: 'selfHooks',
    component: () => import('@/views/SelfHooks.vue'),
    meta: {
      title: '自定义Hooks',
    },
  },
  {
    path: '/tailwindcsstemp',
    name: 'tailwindcsstemp',
    component: () => import('@/views/TailwindcssTemp.vue'),
    meta: {
      title: 'Tailwindcss模板',
    },
  },
  // params  类型路由匹配
  {
    path: '/useStore',
    name: 'useStore',
    component: () => import('@/views/useStore.vue'),
    meta: {
      title: 'Pinia状态管理',
    },
  },
  {
    path: '/useVuetify',
    name: 'useVuetify',
    // component: () => import('@/views/UseVuetify.vue'),
    meta: {
      title: '使用Vuetify',
    },
    redirect: '/useVuetify/useVuetifyCom', //重定向到子路由
    children:[
      {
        path:"useVuetifyCom",
        name: 'UseVuetifyForm',
        component: () => import('@/components/UseVuetify/UseVuetifyForm.vue'),
        meta: {
          title: '使用Vuetify表单',
        },
      },
      {
        path:"useVuetifyTable",
        name: 'UseVuetifyTable',
        component: () => import('@/components/UseVuetify/UseVuetifyTable.vue'),
        meta: {
          title: '使用Vuetify表格',
        },
      }
    ]
  },

  {
    path: '/useRouter',
    name: 'useRouter',
    // alias: ['/useroute', '/testroute'], //设置别名
    component: () => import('@/views/UseRouter.vue'),
    meta: {
      title: 'useRouter使用',
    },
    children: [
      {
        path: 'childView',
        name: 'childView',
        component: () => import('@/components/useRouteCom/ChildView.vue'),
        meta: {
          title: '子路由视图',
        },
        // props:true,//开启props传参 传递路由参数通过defineProps接收
        // props(route){
        //   return route.query
        // }
      },
      {
        path: 'namespace',
        name: 'namespace',
        components: {
          //名称空间
          default: () => import('@/components/useRouteCom/ChildView.vue'),
          aaa: () => import('@/components/useRouteCom/ChildView2.vue'),
          bbb: () => import('@/components/useRouteCom/ChildView3.vue'),
        },
      },
    ],
  },
  {
    path: '/routeGuard',
    name: 'routeGuard',
    component: () => import('@/views/RouteGuard.vue'),
    meta: {
      title: '路由守卫',
    },
  },
  {
    path: '/echartsDemo',
    name: 'echartsDemo',
    component: () => import('@/views/echartsDemo/index.vue'),
    meta: {
      title: 'Echarts演示',
    },
  },
  {
    path: '/changeTheme',
    name: 'changeTheme',
    component: () => import('@/views/ChangeTheme.vue'),
    meta: {
      title: '主题切换'
    },
  },
  {
    path: '/uploadFile',
    name: 'uploadFile',
    component: () => import('@/views/UploadFile.vue'),
    meta: {
      title: '文件上传',
    },
  },

  {
    path: '/textVmodel',
    name: 'TextVmodel',
    component: () => import('@/views/echartsDemo/TextVmodel.vue'),
    meta: {
      title: '文本Vmodel',
    },
  },
  {
    path: '/testTs',
    name: 'testTs',
    component: () => import('@/views/ReviewTsReq/ShopTable.vue'),
    meta: {
      title: '测试tes',
    },
  },
]
